home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 16 / Mac Magazin and MacEasy Magazine CD - Issue 16.iso / Datenbanken & Hypercard / §State-Smart ƒ / §Control / ßControl / background_14765.xml next >
Extensible Markup Language  |  1995-11-23  |  12KB  |  205 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>14765</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_15909.pbm</bitmap>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_3136.css" />
  11.     <part>
  12.         <id>7</id>
  13.         <type>field</type>
  14.         <visible> <false /> </visible>
  15.         <dontWrap> <false /> </dontWrap>
  16.         <dontSearch> <false /> </dontSearch>
  17.         <sharedText> <false /> </sharedText>
  18.         <fixedLineHeight> <true /> </fixedLineHeight>
  19.         <autoTab> <false /> </autoTab>
  20.         <lockText> <true /> </lockText>
  21.         <rect>
  22.             <left>334</left>
  23.             <top>130</top>
  24.             <right>479</right>
  25.             <bottom>288</bottom>
  26.         </rect>
  27.         <style>scrolling</style>
  28.         <autoSelect> <false /> </autoSelect>
  29.         <showLines> <false /> </showLines>
  30.         <wideMargins> <false /> </wideMargins>
  31.         <multipleLines> <false /> </multipleLines>
  32.         <reservedFamily> 0 </reservedFamily>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>left</textAlign>
  36.         <font>Geneva</font>
  37.         <textSize>9</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <textHeight>12</textHeight>
  40.         <name>coordinates</name>
  41.         <script></script>
  42.     </part>
  43.     <part>
  44.         <id>8</id>
  45.         <type>field</type>
  46.         <visible> <false /> </visible>
  47.         <dontWrap> <false /> </dontWrap>
  48.         <dontSearch> <false /> </dontSearch>
  49.         <sharedText> <false /> </sharedText>
  50.         <fixedLineHeight> <true /> </fixedLineHeight>
  51.         <autoTab> <false /> </autoTab>
  52.         <lockText> <false /> </lockText>
  53.         <rect>
  54.             <left>324</left>
  55.             <top>135</top>
  56.             <right>509</right>
  57.             <bottom>341</bottom>
  58.         </rect>
  59.         <style>rectangle</style>
  60.         <autoSelect> <false /> </autoSelect>
  61.         <showLines> <false /> </showLines>
  62.         <wideMargins> <false /> </wideMargins>
  63.         <multipleLines> <false /> </multipleLines>
  64.         <reservedFamily> 0 </reservedFamily>
  65.         <titleWidth>0</titleWidth>
  66.         <icon>0</icon>
  67.         <textAlign>left</textAlign>
  68.         <font>Geneva</font>
  69.         <textSize>12</textSize>
  70.         <textStyle>plain</textStyle>
  71.         <textHeight>16</textHeight>
  72.         <name>legend</name>
  73.         <script></script>
  74.     </part>
  75.     <part>
  76.         <id>10</id>
  77.         <type>field</type>
  78.         <visible> <false /> </visible>
  79.         <dontWrap> <false /> </dontWrap>
  80.         <dontSearch> <false /> </dontSearch>
  81.         <sharedText> <false /> </sharedText>
  82.         <fixedLineHeight> <true /> </fixedLineHeight>
  83.         <autoTab> <false /> </autoTab>
  84.         <lockText> <true /> </lockText>
  85.         <rect>
  86.             <left>226</left>
  87.             <top>6</top>
  88.             <right>391</right>
  89.             <bottom>342</bottom>
  90.         </rect>
  91.         <style>shadow</style>
  92.         <autoSelect> <false /> </autoSelect>
  93.         <showLines> <false /> </showLines>
  94.         <wideMargins> <false /> </wideMargins>
  95.         <multipleLines> <false /> </multipleLines>
  96.         <reservedFamily> 0 </reservedFamily>
  97.         <titleWidth>0</titleWidth>
  98.         <icon>0</icon>
  99.         <textAlign>left</textAlign>
  100.         <font>Chicago</font>
  101.         <textSize>12</textSize>
  102.         <textStyle>plain</textStyle>
  103.         <textHeight>16</textHeight>
  104.         <name>ssfields</name>
  105.         <script>on mouseUpglobal ckeyif ckey thenput the top of me into MyTopput the textHeight of me into TxHtput the number of lines of me into noLwait until the mouseclickput max (1,1 + trunc((the mouseV - MyTop)/TxHt)) into Lput min (L,noL) into Lselect line L of meput false into ckeyelsehide meend ifend mouseUp</script>
  106.     </part>
  107.     <part>
  108.         <id>11</id>
  109.         <type>field</type>
  110.         <visible> <true /> </visible>
  111.         <dontWrap> <false /> </dontWrap>
  112.         <dontSearch> <false /> </dontSearch>
  113.         <sharedText> <false /> </sharedText>
  114.         <fixedLineHeight> <false /> </fixedLineHeight>
  115.         <autoTab> <false /> </autoTab>
  116.         <lockText> <true /> </lockText>
  117.         <rect>
  118.             <left>1</left>
  119.             <top>0</top>
  120.             <right>322</right>
  121.             <bottom>342</bottom>
  122.         </rect>
  123.         <style>scrolling</style>
  124.         <autoSelect> <false /> </autoSelect>
  125.         <showLines> <false /> </showLines>
  126.         <wideMargins> <false /> </wideMargins>
  127.         <multipleLines> <false /> </multipleLines>
  128.         <reservedFamily> 0 </reservedFamily>
  129.         <titleWidth>0</titleWidth>
  130.         <icon>0</icon>
  131.         <textAlign>left</textAlign>
  132.         <font>Geneva</font>
  133.         <textSize>12</textSize>
  134.         <textStyle>plain</textStyle>
  135.         <textHeight>16</textHeight>
  136.         <name>data</name>
  137.         <script></script>
  138.     </part>
  139.     <part>
  140.         <id>12</id>
  141.         <type>button</type>
  142.         <visible> <false /> </visible>
  143.         <reserved5> 0 </reserved5>
  144.         <reserved4> 0 </reserved4>
  145.         <reserved3> 0 </reserved3>
  146.         <reserved2> 0 </reserved2>
  147.         <reserved1> 0 </reserved1>
  148.         <enabled> <true /> </enabled>
  149.         <rect>
  150.             <left>393</left>
  151.             <top>7</top>
  152.             <right>493</right>
  153.             <bottom>29</bottom>
  154.         </rect>
  155.         <style>roundrect</style>
  156.         <showName> <true /> </showName>
  157.         <highlight> <false /> </highlight>
  158.         <autoHighlight> <true /> </autoHighlight>
  159.         <sharedHighlight> <true /> </sharedHighlight>
  160.         <family>0</family>
  161.         <titleWidth>0</titleWidth>
  162.         <icon>0</icon>
  163.         <textAlign>center</textAlign>
  164.         <font>Chicago</font>
  165.         <textSize>12</textSize>
  166.         <textStyle>plain</textStyle>
  167.         <name>Done</name>
  168.         <script>on mouseUpglobal modeanswer "Numeric or Text Data?" with "Num" or "Text"hide bg fld "coordinates"show cd pictshow cd fld "title"hide mesort the lines of bg fld "data"set the locktext of bg fld "data" to trueend mouseUp</script>
  169.     </part>
  170.     <part>
  171.         <id>13</id>
  172.         <type>field</type>
  173.         <visible> <true /> </visible>
  174.         <dontWrap> <false /> </dontWrap>
  175.         <dontSearch> <false /> </dontSearch>
  176.         <sharedText> <false /> </sharedText>
  177.         <fixedLineHeight> <false /> </fixedLineHeight>
  178.         <autoTab> <false /> </autoTab>
  179.         <lockText> <true /> </lockText>
  180.         <rect>
  181.             <left>354</left>
  182.             <top>87</top>
  183.             <right>465</right>
  184.             <bottom>112</bottom>
  185.         </rect>
  186.         <style>rectangle</style>
  187.         <autoSelect> <false /> </autoSelect>
  188.         <showLines> <false /> </showLines>
  189.         <wideMargins> <false /> </wideMargins>
  190.         <multipleLines> <false /> </multipleLines>
  191.         <reservedFamily> 0 </reservedFamily>
  192.         <titleWidth>0</titleWidth>
  193.         <icon>0</icon>
  194.         <textAlign>left</textAlign>
  195.         <font>Geneva</font>
  196.         <textSize>12</textSize>
  197.         <textStyle>plain</textStyle>
  198.         <textHeight>16</textHeight>
  199.         <name>numdat</name>
  200.         <script></script>
  201.     </part>
  202.     <name>Map Color BG</name>
  203.     <script>on showcdfldsput the number of cd flds into rrepeat with i = 1 to rshow cd fld iend repeatend showcdfldson doSL--display the legend--take the values from here and paste them to the legend cardif bg fld "legend" is empty thenanswer "No legend, please define one"exit doSLend ifanswer "Be patient, this is slow"put cd fld "title" into cd fld "title" of cd "legend"put the number of lines of bg fld "legend" into nlput the short name of this cd into cngo cd "legend"repeat with i = 1 to nlset the cursor to busyput word 1 of line i of bg fld "legend" of cd cn into line i of cd fld "minimum" ¬¨of cd "legend"put word 2 of line i of bg fld "legend" of cd cn into line i of cd fld "maximum"¬¨of cd "legend"set the pattern to word 3 of line i of bg fld "legend" of cd cnput "P-"&i into bnasend mouseUp to cd btn bnaend repeatend doSLon closeCardset the locktext of bg fld "numdat" to falseput the number of lines of bg fld "data" into bg fld "numdat"set the locktext of bg fld "numdat" to trueend closeCardon closebackgroundif "Map Color" is in the menus then disable menu "Map Color"close window "Navigator"if "State-Smart" is in the menus then enable menuItem "Quiz" of menu "State-Smart"end closebackgroundon openbackground-- set the userlevel to 5  --just for developmentif "Map Color" is not in the menus thenglobal defcol  --default colorsput "21,11,17,12,6,7,20" into defcollock screengo cd 1 of this bgcreate menu "Map Color"put "Edit Data..." & RETURN¬¨& "Define Legend" & RETURN¬¨& "Paint Map" & RETURN¬¨& "Undo Paint" & RETURN¬¨& "Copy Map" & RETURN¬¨& "Show Legend" into menu "Map Color"put the number of menuItems of menu "Map Color" into nrepeat with i = 1 to nset the menumsg of menuItem i of menu "Map Color" to¬¨line i of cd fld mumsgsend repeatset the enabled of menuItem "Undo Paint" of menu "Map Color" to falseelseenable menu "Map Color"end ifif "State-Smart" is in the menus then disable menuItem "Quiz" of menu "State-Smart"unlock screennavend openbackgroundon doCM--copy the maplock screengo first cd of this bg -- a guaranteed clean cardset the userlevel to 5doMenu("Copy Card")doMenu("Paste Card")set the cantDelete of this cd to falseask "title of new map?"put it into mnset the name of this card to mnput mn into cd fld "title"put "" into bg fld "legend"put the number of lines of bg fld "data" into nlrepeat with i = 1 to nlput word 1 of line i of bg fld "data" into line i of bg fld "data"end repeatshow bg btn "done"popULunlock screenend doCMon doED--allows the user to enter dataput it into modehide cd picthide bg fld "coordinates"hide bg fld "legend"hide cd fld "title"show bg fld "Data"set the locktext of bg fld "data" to falseshow bg btn "Done"if bg fld "data" is empty thenanswer "Type: name of each region space data" with "OK"end ifend doEDon doDL  -- define a legendanswer "Automatic or manual?" with "Auto" or "Manual"if it is "Manual" thenget cd fld "title"go cd "legend"put it into cd fld "title"elseif bg fld "data" is empty then answer "First give me some data"put 100000000 into minput -1000000000 into maxput the number of lines of bg fld "data" into nlput bg fld "data" into temprepeat with i = 1 to nlif word 2 of line i of temp < min thenput word 2 of line i of temp into minend ifif word 2 of line i of temp > max thenput word 2 of line i of temp into maxend ifend repeatput (max - min) / 7 into rput min into word 1 of line 1 of bg fld "legend"put max into word 2 of line 7 of bg fld "legend"repeat with i = 1 to 7put min + (i-1)* r into word 1 of line i of bg fld "legend"put min + i*r into word 2 of line i of bg fld "legend"global defcol  --default colorsput item i of defcol into word 3 of line i of bg fld "legend"end repeatanswer "Auto Legend successful"end ifend doDLon doPM---paint the mapshow cd pictset the userlevel to 3global demosndput 0 into errrepeat with i = 1 to 50set the cursor to busyif word 1 of line i of bg fld "data" <> word 1 of line i+err of bg fld "coordinates" thenanswer "Possible data misalignment" with "Continue" or "Edit Data"if it is "Edit Data" thendoUPshow bg fld "coordinates"doEDexit doPMelse --(Go on) find a matchput false into matchrepeat while match is falseif i+err < 50 and word 1 of line i+err of bg fld "coordinates" <¬¨word 1 of line i of bg fld "data" thenadd 1 to errelseif word 1 of line i of bg fld "data" =¬¨word 1 of line i+err of bg fld "coordinates" thenput true into matchanswer "Continuing: " & err & " regions skipped." with "OK"end ifend ifend repeatif match is false thenanswer "Unable to continue" with "OK"exit doPMend ifend if --**if it is edit data**end if --**if <>--check mode here text or numglobal modeif mode = "text" thenput the number of words of line i of bg fld "data" into nput word 2 to n of line i of bg fld "data" into theNumelseput word 2 of line i of bg fld "data" into theNumend ifput the number of lines of bg fld "legend" into nlset the pattern to 0repeat with j = 1 to nlput line j of bg fld "legend" into theLinif mode = "text" thenif theNUM = word 1 of theLin thenset the pattern to word 3 of theLINexit repeatend ifelseif theNum >= word 1 of theLin and theNum <= word 2 of theLin thenset the pattern to word 3 of theLinexit repeatend ifend ifend repeatput the number of words of line i+err of bg fld "coordinates" into nPntput nPnt div 2  into nPntchoose bucket toolrepeat with j = 1 to nPntput word 2*(j-1)+2 of line i+err of bg fld "coordinates" into xput word 2*(j-1)+3 of line i+err of bg fld "coordinates" into yif demosnd is true thenplay "Click"play "bluup"wait until the sound is "done"end ifclick at x,yend repeatend repeatchoose browse toolset the enabled of menuItem "Undo Paint" of menu "Map Color" to truepopULend doPMon doUPset the userlevel to 4choose brush tooldoMenu "Revert"choose browse toolset the enabled of menuItem "Undo Paint" of menu "Map Color" to falsepopULend doUPfunction killComma dtaput the number of chars in dta into nrepeat with i = 1 to nif char i of dta <> "," then put char i of dta after tend repeatreturn tend killComma</script>
  204. </background>
  205.